cmake_minimum_required(VERSION 3.28.1)
project(CmakeCXX)

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    add_compile_options(-finput-charset=UTF-8)
endif ()

if (MSVC)
    add_compile_options(/utf-8)
endif ()

set(CMAKE_CXX_STANDARD 20)

set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

set(MODULES_OUTPUT_DIR "${CMAKE_BINARY_DIR}/modules")


add_executable(CmakeCXX src/main.cpp include/HowMany.cpp include/HowMany.h include/HowMany2.cpp include/HowMany2.h include/WitchCC.cpp include/WitchCC.h include/Quoter.cpp include/Quoter.h include/Integer.cpp include/Integer.h include/Tree.cpp include/Tree.h include/PStash.cpp include/Pstash.h include/Instrument.cpp include/Instrument.h include/Pet.cpp include/Pet.h)


add_executable(CmakeCXX_Thread src_thread/main_thread.cpp src_thread/task_thread.cpp src_thread/task_thread.h)


add_executable(CmakeCXX_Rtti rtti/Security.cpp rtti/Security.h rtti/Trash.cpp rtti/Trash.h rtti/main_rtti.cpp rtti/MultipleInheritance.h design_pattern/Point.h design_pattern/Singleton.h rtti/fun_ptf.h)

add_executable(CMakeCXX_Algorithm algorithm/algorithm_main.cpp algorithm/NumStringGen.cpp algorithm/NumStringGen.h algorithm/sort_algorithm.cpp algorithm/sort_algorithm.h algorithm/array_test.h algorithm/array_test.cpp)

add_executable(CmakeCXX_Array src_array/fill_array.cpp src_array/fill_array.cpp src_array/fill_array.h src_array/Time.cpp src_array/Time.h
        src_array/array_main.cpp
        src_array/opt_vertor.cpp
        src_array/opt_vertor.h)


add_executable(CMakeCxx_string src_string/exercise_str.cpp src_string/exercise_str.h src_string/str_main.cpp)


add_executable(CmakeCXX_template template_pro/Array_3.h template_pro/X_template.h template_pro/Reload_template.h template_pro/container_template/comtainer_template.h src_template/template_main.cpp src_template/Array.h src_template/StackTemplate.h src_template/PStash.h src_template/Array_2.h src_template/MyError_1.h src_template/MyError_1.cpp src_template/template_main.cpp src_template/Container.h src_template/PWrap.h src_template/Container.cpp src_template/Stock.h src_template/Stock.cpp src_template/Urand.h
        src_template/Gtid.cpp
        src_template/Gtid.h)


add_executable(CmakeCXX_class src_class/main_class.cpp src_class/string_bad.h src_class/string_bad.cpp)


add_executable(CmakeCXX_static_namespace static_namespace/Obj.cpp static_namespace/Obj.h static_namespace/main_namespace.cpp static_namespace/Integer.cpp static_namespace/Integer.h static_namespace/NamespaceMath.h static_namespace/WithStatic.cpp static_namespace/WithStatic.h static_namespace/Initializer.cpp static_namespace/Initializer.h static_namespace/Object_01.cpp static_namespace/Object_01.h static_namespace/Base_1.cpp static_namespace/Base_1.h static_namespace/Container_Obj.cpp static_namespace/Container_Obj.h static_namespace/arr_const.cpp static_namespace/arr_const.h)


add_executable(CmakeCXX_smart_prt smart_prt/sample_unique_prt.cpp smart_prt/smart_main.cpp)


add_executable(CmakeCXX_error_noexcept error_noexcept/main.cpp error_noexcept/throw_noexcept.cpp error_noexcept/throw_noexcept.h)


add_executable(CmakeCXX_container container/main.cpp container/container.cpp container/Container_01.cpp container/sequence_container/array_test.h container/sequence_container/array_test.cpp container/associative_container/container.h container/associative_container/container.cpp container/unordered_container/unordered_container.h container/unordered_container/unordered_container.cpp container/algorithm/algorithm_container.cpp container/algorithm/algorithm_container.h)


add_executable(CmakeCXX_design src_design/src_design.cpp)


add_executable(CmakeCXX_extend src_extend/extend_main.cpp
        src_extend/Base.h
        src_extend/Base.cpp)


add_executable(CmakeCXX_cpp20 src_cpp20/cpp20.cpp)


add_executable(CmakeCXX_PageReplace page_replace/main.cpp
        page_replace/Page.cpp
        page_replace/Page.h
        page_replace/Process.cpp
        page_replace/Process.h)


add_executable(CmakeCXX_graph
        graph/Graph.cpp
        graph/Graph.h
        graph/main.cpp)
 